# -*- encoding: utf-8 -*-
'''
@文件        :responds.py
@Description:       : 响应结果封装
@Date     :2025/11/06 14:00:01
@Author      :lin
@version      :1.0
'''

def ok(message:str=None,data:dict = None):
    r = {}
    r["code"] = 0
    if message is not None:
        r["message"] = message
    if data is not None:
        r["data"] = data
    return r

def error(errcode:int,message:str = None,data:dict = None):
    r = {}
    r["code"] = errcode
    if message is not None:
        r["message"] = message
    if data is not None:
        r["data"] = data
    return r